// N1Object.h: interface for the N1Object class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_N1OBJECT_H__F0CF7048_BE75_45F2_82E5_68F7B29C61C9__INCLUDED_)
#define AFX_N1OBJECT_H__F0CF7048_BE75_45F2_82E5_68F7B29C61C9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "N1Lib.h"

#define N1NAME(aname) virtual const char* name() const { return #aname ; };
#define N1DESC        virtual const char* description() const { return "Default description"; };

class NEXPORT N1Object {
private:
    N1UInt32 m_retainCounter;

protected:
	N1Object();

public:
	virtual ~N1Object();

    virtual N1Object* retain();

    virtual N1Object* release();

    virtual N1UInt32  retainCounter() const;

    virtual N1Object* autorelease();

    virtual bool isEqualTo(N1Object *obj);

    virtual const char*   description() const =0;

    virtual const char*   name() const =0;

    virtual void onNewThread(N1Object *obj) { };
};

#endif // !defined(AFX_N1OBJECT_H__F0CF7048_BE75_45F2_82E5_68F7B29C61C9__INCLUDED_)
